Auto merge of #1564 - alexcrichton:right-timeout, r=brson
authorbors <bors@rust-lang.org>
Thu, 30 Apr 2015 01:48:01 +0000 (01:48 +0000)
committerbors <bors@rust-lang.org>
Thu, 30 Apr 2015 01:48:01 +0000 (01:48 +0000)
commit91ea24061e13df01fe6ac65b74fc2891c2264a77
tree422bb64048c8dd4cbfefccb47e53fc9bb5ae7940
parentefd2ea99a98098b8c88df3295c5ddd4fc318718c
parent923c2f2dfabb6881bb8fda88023a5cf25452d7f2
Auto merge of #1564 - alexcrichton:right-timeout, r=brson

Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
  receive 10 bytes of data in the specified tiemout period that the entire
  transfer will be timed out.

Closes #1560